package com.jd.entity;


import com.github.wxpay.sdk.WXPayConfig;
//import org.apache.commons.io.IOUtils;







import java.io.ByteArrayInputStream;
import java.io.InputStream;
/**
 * @author masicheng 
 * 时间 : 2020年7月7日 上午9:09:02 
 * 注释 :微信支付所需参数
 */
public class WxPayConfig implements WXPayConfig {

    /**配置证书*/
    private byte [] certData;

    /*public OurWxPayConfig() throws  Exception{
        InputStream certStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("cert/wxpay/apiclient_cert.p12");
        this.certData = IOUtils.toByteArray(certStream);
        certStream.close();
    }*/

    @Override
    public String getAppID() {
        return "wx368eaef1845f00c6";
    }
    @Override
    public String getMchID() {
        return "1605203331";
    }
    @Override
    public String getKey() {
        return "dENAq0u9aPdQyIgTYOJgiNpHpkRhgNoW";
    }
    
    //wx支付回调
    public static String NotifyUrl = "http://www.bfwcg.com/game/wxNotifyUrl/wx";

    @Override
    public InputStream getCertStream() {
        return new ByteArrayInputStream(this.certData);
    }
    @Override
    public int getHttpConnectTimeoutMs() {
        return 0;
    }

    public int getHttpReadTimeoutMs() {
        return 0;
    }
}